#include <lib.h>
#define sem_assign	_sem_assign
#include <semaphore.h>

PUBLIC int sem_assign(sm, value)
sem_t* sm;
unsigned int value;
{
  message m;
  int ret;
  m.m1_i1 = sm->id;
  m.m1_i2 = value;
  
  if (_syscall(FS, SEM_ASSIGN, &m) < 0) return(-1);
  
  return 0;
}
